﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SDT.Site.ViewModels.ProjectListModels>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%if (Model.Projects != null && Model.Projects.Count > 0)
     {
         var first = Model.Projects[0]; %> 
      <div><h1><%=first.Title %></h1></div>
      <div class="pad" align="center">
      <a href="/project/details/<%=first.ID %>/<%=Html.ToUrlFriendly(first.Title)%>">
            <% string imgPath = (first.ImagePath != null && first.ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(first.ID, 405, 269, first.ImagePath, Model.ImagePath, Model.ImageUrl) : SDT.Lib.Common.Globals.DefaultLogo; %>
            <img src="<%=imgPath %>" title="<%=first.Title %>" alt="<%=first.Title %>" class="bor_img" width="405" height="269" style="overflow:hidden"/>
        </a>
      </div>
      <p>
        <%=Html.Encode(first.Summary) %>
      </p>
    <div class="clear"></div>
    <%if (Model.Projects.Count > 1)
        {%>
        <div class="duan_list">
        <ul>
	        <%for (int i = 1; i < Model.Projects.Count; i++)
           {
               string imgPath1 = (Model.Projects[i].ImagePath != null && Model.Projects[i].ImagePath != string.Empty) ? SDT.Lib.Common.Utils.GenThumbnail(Model.Projects[i].ID, 132, 96, Model.Projects[i].ImagePath, Model.ImagePath, Model.ImageUrl) : SDT.Lib.Common.Globals.DefaultLogo;
               %>
	        <li>
    	        <a href="/project/details/<%=Model.Projects[i].ID %>/<%=Html.ToUrlFriendly(Model.Projects[i].Title)%>">
                <img class="bor_img" src="<%=imgPath1 %>" title="<%=Model.Projects[i].Title %>" alt="<%=Model.Projects[i].Title %>" width="132" height="96" /></a>
                <div><a href="/project/details/<%=Model.Projects[i].ID %>/<%=Html.ToUrlFriendly(Model.Projects[i].Title)%>"><strong><%=Html.Encode(Model.Projects[i].Title)%></strong></a></div>
            </li>
            <%}%>
           
        </ul>
        </div>
        <%}%>
    <%} %>
    <div class="clear"></div>
